<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>VUE学习 - 2.1-模板插值</title>
</head>

<body>


    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
    <div id="Application" style="text-align: center;">

        <h1 v-bind:id="id1">这里是模板内容：<span>{{count + 10}}</span>次点击</h1>
        <button v-on:click="clickButton">按钮</button>
        <h1 v-bind:[prop]="name" v-if="show">标题</h1>
        <input v-model.trim="content">

    </div>


    <script>
        const App = {
            data() {
                return {
                    count: 0,
                    countHTML: "<span style='color:red;'>0</span>",
                    id1: "h1",
                    show: true,
                    prop: "class",
                    name: "h1",
                }
            },

            methods: {
                clickButton() {
                    this.count = this.count + 1
                }
            }
        }
        Vue.createApp(App).mount("#Application")

    </script>

    <style>
        #h1 {
            color: red;
        }

        .h1 {
            color: blue;
        }
    </style>


</body>

</html>